#ifndef DYNAMICOBJECT_H
#define DYNAMICOBJECT_H

#include <map>
#include "Engine2D/game.h"

using namespace game;
using namespace std;

class DynamicObject : public GameObject
{	
  public:
    DynamicObject();
    DynamicObject(GameGraphic*, const char*, float, float, int);
    virtual Rect GetRectBound();
    virtual int GetLayer();
    virtual void SetOrigin(float, float);
    virtual void Update(unsigned int = 0);
    virtual void Render(unsigned int = 0);
    virtual ~DynamicObject();
		
  protected:
    bool IsCollide(Rect, Rect);

    Sprite* pSprite;
    float posX;		//X-Coordinate of object in game's map 
    float posY;		//Y-Coordinate of object in game's map
    int layer;		//Layer of object
    float originX;	//X-Origin of object when draw
    float originY;	//Y-Origin of object when draw

    static map<const char*, Sprite*> mSprite;
    static int numberObject;
};

#endif